Expose acceleration_trust_factor in Python bindings#214
Open
bodono wants to merge 2 commits into
Open
Conversation
Plumbs the new ScsSettings.acceleration_trust_factor field through the Cython kwargs interface. Defaults to math.inf (no cap, matches current SCS HEAD behavior); positive finite values activate the trust-region + adaptive-r mode from the underlying aa library. Bumps scs_source submodule to pick up the C-side change. Validation rejects NaN and non-positive values. Adds coverage tests for the default, finite/inf sweep, and rejection cases.
Pulls in the cvxgrp/scs PR #396 fix that silences a gcc -Wunused-result warning on the EOF-tolerant fread for acceleration_trust_factor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Plumbs the new
acceleration_trust_factorsetting (added in cvxgrp/scs#396) through the scs Python kwargs interface.acceleration_trust_factorto the kwlist and argparse format inscs/scsobject.hscs_sourcesubmodule to the corresponding scs branchmath.inf= no cap, current HEAD behavior), a sweep of positive finite values, and rejection of bad inputsThe default is
math.infwhich preserves the current HEAD behavior bit-for-bit. Positive finite values turn on the trust-region + adaptive-r mode from the underlying aa library (PR #54 there), enabling parameter sweeps for further tuning.Test plan
python -m pytest test/test_scs_coverage.py— 286/286 passpython -m pytest test/test_scs_basic.py test/test_scs_object.py— 26/26 passDepends on cvxgrp/scs#396 being merged before this can land cleanly.